<%-- 
    Document   : danhsachkhachhangcontent
    Created on : Oct 30, 2011, 7:04:43 PM
    Author     : Administrator
--%>

<%@page import="java.text.DecimalFormat"%>
<%@page import="java.util.List"%>
<%@page import="hibernate.pojo.Khachhang"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    try {
        DecimalFormat df = new DecimalFormat("###,###,###");
        List<Khachhang> lstKhachHang = (List<Khachhang>) request.getAttribute("DanhSachKhachHang");
        if (lstKhachHang != null) {
%>
<b>DANH SÁCH KHÁCH HÀNG</b>
<div class="hastable">
    <form name="myform" class="pager-form" method="post" action="#">
        <table id="sort-table"> 
            <thead> 
                <tr>
                    <th><input type="checkbox" value="check_none" onclick="this.value=check(this.form.list)" class="submit"/></th>
                    <th>STT</th>
                    <th>Họ & Tên</th> 
                    <th>Giới Tính</th>
                    <th>Tài Khoản</th> 
                    <th>Email</th> 
                    <th>Số Dư Tài Khoản</th>
                    <th style="width:132px">Tùy Chỉnh</th> 
                </tr> 
            </thead> 
            <tbody>
                <%
                    for (int i = 0; i < lstKhachHang.size(); i++) {
                        Khachhang khachhang = lstKhachHang.get(i);
                %>
                <tr>
                    <td class="center"><input type="checkbox" value="1" name="list" class="checkbox"/></td> 
                    <td><%=i + 1%></td> 
                    <td><%=khachhang.getHoTen()%></td> 
                    <td><%=khachhang.getGioiTinh()%></td> 
                    <td><%=khachhang.getTaiKhoan()%></td> 
                    <td><%=khachhang.getEmail()%></td>
                    <td><%=df.format(khachhang.getSoDuTaiKhoan())%>đ</td>
                    <td>
                        <a class="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Cập Nhật" href="admincustomercontroller?action=linktoupdate&amp;maKhachHang=<%=khachhang.getMaKhachHang()%>">
                            <span class="ui-icon ui-icon-wrench"></span>
                        </a>
                        <a class="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Favourite this example" href="">
                            <span class="ui-icon ui-icon-heart"></span>
                        </a>
                        <a class="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Add to shopping card example" href="admincustomercontroller?action=viewlistdealbought&amp;maKhachHang=<%=khachhang.getMaKhachHang()%>">
                            <span class="ui-icon ui-icon-cart"></span>
                        </a>
                        <a class="btn_no_text btn ui-state-default ui-corner-all tooltip" title="Delete this example" href="#">
                            <span class="ui-icon ui-icon-circle-close"></span>
                        </a>
                    </td>
                </tr>
                <%}%>
            </tbody>
        </table>
    </form>
</div>
<%
        }
    } catch (Exception ex) {
        out.println(ex);
    }
%>

